package com.okami.study;

import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * @author: TanJingyu
 * @create: 2021-03-16 16:32
 **/
class Test {
    public static void main(String[] args) {
//        String str = "";
//        Object o = new Object();
//        System.out.println(str.getClass() == o.getClass());
        String json = "{\n" +
                "    \"type\": \"page\",\n" +
                "    \"body\": [\n" +
                "        {\n" +
                "            \"filter\": {\n" +
                "                \"controls\": [\n" +
                "                    {\n" +
                "                        \"name\": \"purchaseOrderItem$name\",\n" +
                "                        \"label\": \"采购单\",\n" +
                "                        \"placeholder\": \"请输入采购单名称\",\n" +
                "                        \"type\": \"text\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"name\": \"purchaseOrderItem$skuName\",\n" +
                "                        \"label\": \"sku名称\",\n" +
                "                        \"placeholder\": \"请输入sku名称\",\n" +
                "                        \"type\": \"text\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"clearable\": true,\n" +
                "                        \"name\": \"supplierInfo$id\",\n" +
                "                        \"source\": \"get:/api/supplier/options\",\n" +
                "                        \"label\": \"供应商信息\",\n" +
                "                        \"placeholder\": \"请输入供应商信息\",\n" +
                "                        \"type\": \"select\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"clearable\": true,\n" +
                "                        \"options\": [\n" +
                "                            {\n" +
                "                                \"label\": \"公户\",\n" +
                "                                \"value\": \"PUBLIC\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"label\": \"私户\",\n" +
                "                                \"value\": \"PRIVATE\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"name\": \"accountType\",\n" +
                "                        \"label\": \"帐户类型\",\n" +
                "                        \"placeholder\": \"请输入帐户类型\",\n" +
                "                        \"type\": \"select\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"options\": [\n" +
                "                            {\n" +
                "                                \"label\": \"是\",\n" +
                "                                \"value\": \"true\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"label\": \"否\",\n" +
                "                                \"value\": \"false\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"name\": \"agreeToPurchase\",\n" +
                "                        \"label\": \"是否同意采购\",\n" +
                "                        \"placeholder\": \"请输入同意采购\",\n" +
                "                        \"type\": \"select\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"format\": \"YYYY-MM-DD\",\n" +
                "                        \"name\": \"createdTime\",\n" +
                "                        \"label\": \"创建时间\",\n" +
                "                        \"placeholder\": \"请输入创建时间\",\n" +
                "                        \"type\": \"date-range\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"format\": \"YYYY-MM-DD\",\n" +
                "                        \"name\": \"lastModifiedTime\",\n" +
                "                        \"label\": \"上次修改时间\",\n" +
                "                        \"placeholder\": \"请输入上次修改时间\",\n" +
                "                        \"type\": \"date-range\"\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"title\": \"条件搜索\"\n" +
                "            },\n" +
                "            \"filterTogglable\": true,\n" +
                "            \"footerToolbar\": [\n" +
                "                \"statistics\",\n" +
                "                \"switch-per-page\",\n" +
                "                \"pagination\"\n" +
                "            ],\n" +
                "            \"columns\": [\n" +
                "                {\n" +
                "                    \"name\": \"params.purchaseOrderItem.name\",\n" +
                "                    \"label\": \"采购订单名称\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"purchaseOrderItem.spuCode\",\n" +
                "                    \"label\": \"spu编码\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"purchaseOrderItem.skuCode\",\n" +
                "                    \"label\": \"sku编码\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"purchaseOrderItem.skuName\",\n" +
                "                    \"label\": \"sku名称\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"params.supplierInfo.name\",\n" +
                "                    \"label\": \"供应商信息\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"quotePrice\",\n" +
                "                    \"label\": \"报价价格\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"purchaseOrderItem.qty\",\n" +
                "                    \"label\": \"采购数量\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"availableQty\",\n" +
                "                    \"label\": \"供货数量\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"purchaseQty\",\n" +
                "                    \"label\": \"采购数量\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"params.accountType.name\",\n" +
                "                    \"label\": \"帐户类型\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"agreeToPurchase\",\n" +
                "                    \"label\": \"是否同意采购\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"createdTime\",\n" +
                "                    \"label\": \"创建时间\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"lastModifiedTime\",\n" +
                "                    \"label\": \"上次修改时间\",\n" +
                "                    \"sortable\": true,\n" +
                "                    \"searchable\": true\n" +
                "                }\n" +
                "            ],\n" +
                "            \"api\": \"/api/tQuotationOrder\",\n" +
                "            \"quickSaveApi\": \"put:/api/tQuotationOrder/purchase-qty/batch\",\n" +
                "            \"type\": \"crud\",\n" +
                "            \"headerToolbar\": [\n" +
                "                \"filter-toggler\",\n" +
                "                \"statistics\",\n" +
                "                \"bulkActions\"\n" +
                "            ]\n" +
                "        }\n" +
                "    ]\n" +
                "}";
        System.out.println(json.replace(" ",""));
    }
}
